10 WindowsNT5 Microsoft Access Microsoft Excel Microsoft Outlook Microsoft Powerpoint Microsoft Word Mouse Egwaine Mouse Notepad Egwaine skipped 'foo' node Mouse Notepad Egwaine Mouse Notepad Egwaine Microsoft Visual Basic Microsoft Visual C++ Microsoft Visual J++ Microsoft Visual InterDev
Last updated on 8/23/00

TreeView Widget

/widgets/listHTC/treeview.htc

The TreeView control directly translates an XML hierarchy into a expandable tree structure for use in selection.

loading widget, please wait...

 
 
 

Event log:


events

onError
fires on error (when m_bDebug = true in HTC, shows alert as well)

event object properties

window.event.error String. Returns error detail.

OnItemSelect
fires when an item selected

event object properties

window.event.XMLitem XMLNode. The XML node for the selected item

OnItemUnselect
fires when an item unselected

event object properties

window.event.XMLitem XMLNode. The XML node for the unselected item

OnItemExecute
fires when an item double-clicked

event object properties

window.event.XMLitem XMLNode. The XML node for the executed item

OnItemOpen
fires when a container item is opened

event object properties

window.event.XMLitem XMLNode. The XML node for the opened item

OnItemClose
fires when a container item is closed

event object properties

window.event.XMLitem XMLNode. The XML node for the closed item

methods

elTreeView.UnselectAll()
unselects all items in the list

parameters

none

return value

none

elTreeView.selectNode(sValue)
selects the first item found whose node value is equal to sValue. If not found nothing is selected and no error is returned.

parameters

sValue Required. Value of field to search for.

return value

none

elTreeView.setActive(sValue)
sets the first item found whose node value is equal to sValue as the active node. If not found the previous active node (if any) is still set and no error is returned.

parameters

sValue Required. Value of field to search for.

return value

none

elTreeView.hideActive(bHide)
when bHide is true hides the active node and any children, otherwise shows active node

parameters

bHide Required. Boolean. True hides, false displays.

return value

none

elControl.enableActive(bEnable)
when bEnable is true enables the active node, otherwise disables active node

parameters

bEnable Required. Boolean. True enables, false disables.

return value

none

elTreeView.expandActive(bExpand)
when bExpand is true opens the active node and any children, otherwise closes active node

parameters

bExpand Required. Boolean. True opens, false closes.

return value

none

elTreeView.expandAll(bExpand)
when bExpand is true opens the all nodes, otherwise closes all nodes

parameters

bExpand Required. Boolean. True opens all, false closes all.

return value

none

elTreeView.reload(sOp, sArgs)
reloads the list using an operation configured in meta-xml.

parameters

sOp is an operation child node name in meta-xml. The child nodes' id corresponds to a form in the document whose ACTION = the post page and whose elements will be sent along with any other arguments below

sArgs is a list of URL-encoded page arguments to pass to the post page. Note: arguments sent by default: "op", "page" (for "newpage" op), "column" and "direction" (for sort op), "xmlrecord" (for sublist op)

return value

none

bRelated = elTreeView.areRelated(sFrom, sTo)
check if there is a path in between two nodes. Returns true if they have.

parameters

sFrom is a node name or caption attribute value

sTo is a node name or caption attribute value

return value

none

container attributes (set on element using TreeView behavior)

DataXML xml data (from a recordset) data-island id

meta-xml

DataXML

Unlike other widgets, the TreeView uses certain flag attributes on the DataXML tree to affect its display: